<template>
  <div class="local-variables">
    {{ subtotal }}
  </div>
</template>

<script>
export default {
  name: 'local-variables',
  data() {
    return {
      n: 10
    }
  },
  computed: {
    m() {
      return 20
    },
    subtotal() {
      console.time('AAA')
      const { n, m } = this
      let result = n
      for (let i = 0; i < 999999; i++) {
        result += Math.sqrt(Math.cos(Math.sin(m))) + n * m + m * m + n * n
      }
      return result
    }
  },
  mounted() {
    console.timeEnd('AAA')
  }
}
</script>

<style lang="less" scoped></style>
